








<template>
  <view class="nav-header">
    <!-- 返回按钮 -->
    <!--<button class="back-btn" @click="goBack">-->
<!--      <text class="back-icon">＜</text>-->
<!--    </button>-->
<!--    <text class="title">{{ title }}</text>-->
<!--    <view class="right-icons"></view>-->
    <!-- 分享按钮（这里只是示例，可根据微信小程序分享 API 实现） -->
<!--    <button class="share-btn" @click="share">-->
<!--     <text class="share-icon">...</text>-->
<!--    </button>-->

  </view>
</template>

<script setup>
import { ref } from 'vue';
//import { useRouter } from 'uni-simple-router'; // 若使用 UniApp 路由

const router = useRouter();
const props = defineProps({
  title: {
    type: String,
    default: ''
  }
});

const goBack = () => {
  router.back();
};

const share = () => {
  // 这里可调用微信小程序分享相关 API，如 uni.share
  uni.showToast({
    title: '分享功能待实现',
    icon: 'none'
  });
};
</script>

<style scoped>
.nav-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 44px;
  padding: 0 16px;
  background-color: #fff;
  border-bottom: 1px solid #eee;
}

.back-btn {
  background-color: transparent;
  border: none;
  padding: 0;
}

.back-icon {
  font-size: 20px;
}

.title {
  font-size: 18px;
  font-weight: bold;
}
.right-icons {
  display: flex;
  align-items: center;
}
.share-btn {
  background-color: transparent;
  border: none;
  padding: 0 8px;
}
.share-icon {
  font-size: 20px;
}
</style>